package com.artPreter.controller;


import com.artPreter.pojo.ArtistContentSection;
import com.artPreter.pojo.Result;
import com.artPreter.service.IArtistContentSectionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 艺术家栏目内容表 前端控制器
 * </p>
 *
 * @author jarvis
 * @since 2024-11-23
 */
@RestController
@RequestMapping("/artistContentSection")
public class ArtistContentSectionController {

    @Autowired
    private IArtistContentSectionService artistContentSectionService;

    /**
     * 内容栏目表列表
     * @param
     * @return
     */
    @PostMapping("/getList")
    public Result getList(@RequestBody ArtistContentSection artistContentSection){
        List<ArtistContentSection> result = artistContentSectionService.getList(artistContentSection);
        return Result.success(result);
    }

    /**
     * 编辑内容栏目表
     * @param artistContentSection
     * @return
     */
    @PostMapping("/edit")
    public Result edit(@RequestBody ArtistContentSection artistContentSection){
        artistContentSectionService.edit(artistContentSection);
        return Result.success("编辑成功");
    }

}
